//go:build wireinject
// +build wireinject

package cmd

import (
	"gitee.com/xuender/mysql-proxy/pb"
	"gitee.com/xuender/mysql-proxy/proxy"
	"github.com/google/wire"
)

// InitApp 初始化应用.
func InitProxy(config *pb.Config) *proxy.Service {
	wire.Build(
		proxy.NewService,
		proxy.NewDBService,
		// proxy.NewLdapService,
		proxy.NewAuthService,
		proxy.NewConnService,
		proxy.NewCheckService,
		proxy.NewConfigService,
	)

	return &proxy.Service{}
}
